<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>字符串大小写转换</title>
    <script>
        function toUpperCase(str) {
            return str.toLocaleUpperCase()
        }

        function toLowerCase(str) {
            return str.toLocaleLowerCase()
        }

        document.write('原字符串为：www.jb51.ITCAST.CN' + '<br>')
        document.write(toUpperCase('www.jb51.ITCAST.CN') + '<br>')
        document.write(toLowerCase('www.jb51.ITCAST.CN') + '<br>')
    </script>
</head>

<body>

</body>

</html>